package command;

import pojo.Player;

public abstract class CommandFactory {

	public static enum CommandCode {
		// System
		EXIT, HELP, LOGIN, SIGNUP, QUIT,

		// PLAYER
		ASK, ANSWER, LIST, ACCEPT, SCORE
	}

	public static CommandFactory buildFactory(Player player) {
		if (player == null) {
			return new SystemCommandFactory();
		}
		return new PlayerCommandFactory(player);
	}

	public abstract Command buildCommand(CommandCode cmd);

}
